<%@page language="java" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>职位管理</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="../../css/mine.css" type="text/css" rel="stylesheet">
</head>

<body>

<div class="div_head">
            <span>
                <span style="float:left">当前位置是：-》职位管理</span>
                <span style="float:right;margin-right: 8px;font-weight: bold">
                    <a style="text-decoration: none" href="list.html">【返回】</a>
                </span>
            </span>
</div>
<div></div>

<div style="font-size: 13px;margin: 10px 5px">
    <form action="/resouce/demo3/update" method="post">
        <table border="1" width="100%" class="table_a">
            <tr>
                <td width="120px;">职位编码<span style="color:red">*</span>：</td>

                <td>
                    <input type="hidden" name="roleid" value="${role.roleid}" />
                    <input type="text" name="rolenum" value="${role.rolenum}"/></td>
            </tr>
            <%--<tr>--%>
            <%--<td>职位编码<span style="color:red">*</span>：</td>--%>
            <%--<td>--%>
            <%--<input type="text" name="f_goods_name" value="人事总监" /> --%>
            <%--</td>--%>
            <%--</tr>--%>

            <tr>
                <td>职位名称<span style="color:red">*</span>：</td>
                <td><input type="text" name="rname" value="${role.rname}"/></td>
            </tr>
            <tr>
                <td>职位分类<span style="color:red">*</span>：</td>
                <td>
                    <select>
                        <option>管理</option>
                        <option>技术</option>
                        <option>实施</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>所属部门<span style="color:red">*</span>：</td>
                <td>

                    <select name="deptid">
                        <c:forEach items="${depts}" var="dep">
                            <option value="${dep.deptid}" ${dep.deptid==role.deptid?'selected':''}>${dep.deptname}</option>
                        </c:forEach>
                    </select>
                </td>
            </tr>

            <tr>
                <td>菜单权限<span style="color:red">*</span>：</td>
                <td>
                    <c:forEach items="${menus}" var="menu">
                        <input type="checkbox" name="menuids" value="${menu.menuid}" <c:forEach items="${role.menuList}"
                                                                                                var="m1">
                            <c:if test="${menu.menuid==m1.menuid}">
                                checked
                            </c:if>
                        </c:forEach>/>${menu.menuname}<br/>
                        <c:forEach items="${menu.secondList}" var="second">
                            &nbsp;&nbsp;&nbsp;<input type="checkbox" name="menuids" value="${second.menuid}"
                            <c:forEach items="${role.menuList}" var="m1">
                                <c:forEach items="${m1.secondList}" var="m2">
                                    <c:if test="${second.menuid==m2.menuid}">
                                        checked
                                    </c:if>
                                </c:forEach>
                            </c:forEach>/>${second.menuname}
                            <br/>
                        </c:forEach>
                    </c:forEach>
                </td>
                <%--<input type="checkbox"/>个人信息<br/>--%>
                <%--&nbsp;&nbsp;&nbsp;<input type="checkbox"/>个人信息修改<br/>--%>
                <%--&nbsp;&nbsp;&nbsp;<input type="checkbox"/>密码修改<br/>--%>
                <%--<input type="checkbox"/>薪酬管理<br/>--%>
                <%--&nbsp;&nbsp;&nbsp;<input type="checkbox" />薪酬标准管理<br/>--%>
                <%--&nbsp;&nbsp;&nbsp;<input type="checkbox"/>薪酬标准审批<br/>--%>
                <%--&nbsp;&nbsp;&nbsp;<input type="checkbox"/>薪酬发放管理<br/>--%>
            </tr>


            <tr>
                <td>职位描述<span style="color:red">*</span>：</td>
                <td>
                    <textarea name="des">${role.des}</textarea>
                </td>
            </tr>

            <tr>
                <td>备 注：</td>
                <td>
                    <textarea name="remark">${role.remark}</textarea>
                </td>
            </tr>
            <tr>
                <td>是否启用：</td>
                <td>
                    <select name="rstate">
                        <option value="1" ${role.rstate==1?'selected':''}>是</option>
                        <option value="2" ${role.rstate==2?'selected':''}>否</option>
                    </select>
                </td>
            </tr>

            <tr>
                <td colspan="2" align="center">
                    <input type="submit" value="提交">
                    <input type="submit" value="清空">
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>